package com.bjsxt.mapper;

import com.bjsxt.pojo.Admin;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Select;

import java.util.List;

public interface AdminMapper {

    @Select("select *  from  t_admin where  aname=#{param1} and  apwd=#{param2}")
    Admin  selectOne(String aname,String apwd);

    @Select("select * from t_admin")
    List<Admin> selectAll();

    Integer  insert(Admin admin);

    @Insert("insert into  t_admin_role values(#{param1},#{param2},default)")
    Integer insertRole(Integer aid, Integer rid);
}
